<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>阅学网</title>
<meta name="Keywords"
	content="阅学网">
<meta name="description"
	content="阅学网">
<jsp:include page="/user/common.jsp" />
 <script type="text/javascript" charset="utf-8" src="ueditor/ueditor.config.js"></script>
 <script type="text/javascript" charset="utf-8" src="ueditor/ueditor.all.min.js"> </script>
 <script type="text/javascript" charset="utf-8" src="ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="js/user/article/article.js?v=1.0"></script>
</head>
<body>
<jsp:include page="/user/top.jsp"></jsp:include>
<jsp:include page="/user/article/articleLeft.jsp"></jsp:include>
<div style="float: left;width:80%;">
    <div class="panel-body" style="padding-bottom:0px;">
        <div class="panel panel-default">
            <div class="panel-heading">查询条件</div>
            <div class="panel-body">
                 <div class="form-group" style="margin-top:15px">
                		<form id="formSearch" class="form-horizontal">
	                        <label class="control-label col-sm-1" >标题</label>
	                        <div class="col-sm-3">
	                            <input type="text" class="form-control" value="" id="articleTitle" name="articleTitle">
	                        </div>
	                        <label class="control-label col-sm-1">状态</label>
	                        <div class="col-sm-3">
									<div class="form-group">
									    <select class="form-control" id="status" >
										      <option value="" selected="selected">--全部--</option>
										      <option value="0">草稿</option>
										      <option value="1">待审核</option>
										      <option value="2" >已发布</option>
										      <option value="3">回收站</option>
									    </select>
	  								</div>
	                        	</div>
                         </form>
                        <div class="col-sm-4" style="text-align:left;">
                            <button type="button" style="margin-left:50px" id="article-query" class="btn btn-primary ">
                            	<span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
                            </button>
                            <button type="button"  id="article-reset" class="btn btn-primary">
                            	<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>重置
                            </button>
                        </div>
                  </div>
            </div>
        </div>       

        <div id="toolbar"   style="padding-bottom:10px;">
            <button id="article-add-btn" type="button" class="btn btn-primary" style="margin-right: 3px;">
                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
            </button>
            <button id="article-edit-btn" type="button" class="btn btn-success" style="margin-right: 3px;">
                <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>修改
            </button>
            <button id="article-delete-btn" type="button" class="btn btn-danger">
                <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
            </button>
            <button id="article-recycle-btn" type="button" class="btn btn-danger">
                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>回收站
            </button>
        </div>
        <table id="user-article-list-table"></table>
    </div>
    
    <!-- 新增、编辑 -->
	<div class="modal fade" id="article-add-or-update-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog"  style="width: 880px;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
						&times;
					</button>
					<h4 class="modal-title" id="myModalLabel">
						添加/编辑文章
					</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" role="form" id="article-form">
						<input type="hidden" name="id" id="articleId" value=""/>
						<div class="form-group">
							<label for="articleTitle" class="col-sm-2 control-label">文章标题<span class="require">*</span></label>
							<div class="col-sm-10">
								<input type="text" class="form-control" id="articleTitle"  name="articleTitle"   placeholder="文章标题">
							</div>
						</div>
						<div class="form-group">
							<label for="articleBriefIntroduction" class="col-sm-2 control-label">简要概述<span class="require">*</span></label>
							<div class="col-sm-10">
								<input type="text" class="form-control" id="articleBriefIntroduction" name="articleBriefIntroduction"   placeholder="简要概述">
							</div>
						</div>
						<div class="form-group">
							<label for="articleKeyword" class="col-sm-2 control-label">关键词<span class="require">*</span></label>
							<div class="col-sm-10">
								<input type="text" class="form-control" id="articleKeyword" name="articleKeyword"   placeholder="关键词，多个用、隔开">
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-2">文章类型<span class="require">*</span></label>
	                        <div class="col-sm-3">
									   <select class="form-control" id="categoryId" name="categoryId" onchange="selectByCategory();">
										     <option value="1" selected="selected">编程开发</option>
											<option value="2">数据库</option>
											<option value="3">前端开发</option>
											<option value="4">服务器</option>
											<option value="5">云计算</option>
											<option value="6">大数据</option>
									    </select>
									    
	                        </div>
	                        <div class="col-sm-3">
	                        		<select name="articleTypeId" class="form-control" id="articleTypeId"></select>
	                        </div>
						</div>
						<div class="form-group">
							<label for="articleBriefIntroduction" class="col-sm-2 control-label">文章类容<span class="require">*</span></label>
							<div class="col-sm-10">
								<script id="editor" type="text/plain" ></script>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-primary" id="article-draft-btn" >存草稿</button>
					<button type="button" class="btn btn-primary" id="article-save-btn" >提交</button>
				</div>
			</div>
		</div>
	</div>
 </div>
 	<script type="text/javascript">
		 //实例化编辑器
		//建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
		var ue = UE.getEditor('editor');
	</script>
</body>
</html>
